package com.ruoyi.ctcx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ctcx.mapper.TbInsuranceContractCommissionPlanMapper;
import com.ruoyi.ctcx.domain.TbInsuranceContractCommissionPlan;
import com.ruoyi.ctcx.service.ITbInsuranceContractCommissionPlanService;

/**
 * 保险合同佣金支付计划Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-21
 */
@Service
public class TbInsuranceContractCommissionPlanServiceImpl implements ITbInsuranceContractCommissionPlanService 
{
    @Autowired
    private TbInsuranceContractCommissionPlanMapper tbInsuranceContractCommissionPlanMapper;

    /**
     * 查询保险合同佣金支付计划
     * 
     * @param id 保险合同佣金支付计划主键
     * @return 保险合同佣金支付计划
     */
    @Override
    public TbInsuranceContractCommissionPlan selectTbInsuranceContractCommissionPlanById(Long id)
    {
        return tbInsuranceContractCommissionPlanMapper.selectTbInsuranceContractCommissionPlanById(id);
    }

    /**
     * 查询保险合同佣金支付计划列表
     * 
     * @param tbInsuranceContractCommissionPlan 保险合同佣金支付计划
     * @return 保险合同佣金支付计划
     */
    @Override
    public List<TbInsuranceContractCommissionPlan> selectTbInsuranceContractCommissionPlanList(TbInsuranceContractCommissionPlan tbInsuranceContractCommissionPlan)
    {
        return tbInsuranceContractCommissionPlanMapper.selectTbInsuranceContractCommissionPlanList(tbInsuranceContractCommissionPlan);
    }

    /**
     * 新增保险合同佣金支付计划
     * 
     * @param tbInsuranceContractCommissionPlan 保险合同佣金支付计划
     * @return 结果
     */
    @Override
    public int insertTbInsuranceContractCommissionPlan(TbInsuranceContractCommissionPlan tbInsuranceContractCommissionPlan)
    {
        tbInsuranceContractCommissionPlan.setCreateTime(DateUtils.getNowDate());
        return tbInsuranceContractCommissionPlanMapper.insertTbInsuranceContractCommissionPlan(tbInsuranceContractCommissionPlan);
    }

    /**
     * 修改保险合同佣金支付计划
     * 
     * @param tbInsuranceContractCommissionPlan 保险合同佣金支付计划
     * @return 结果
     */
    @Override
    public int updateTbInsuranceContractCommissionPlan(TbInsuranceContractCommissionPlan tbInsuranceContractCommissionPlan)
    {
        tbInsuranceContractCommissionPlan.setUpdateTime(DateUtils.getNowDate());
        return tbInsuranceContractCommissionPlanMapper.updateTbInsuranceContractCommissionPlan(tbInsuranceContractCommissionPlan);
    }

    /**
     * 批量删除保险合同佣金支付计划
     * 
     * @param ids 需要删除的保险合同佣金支付计划主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceContractCommissionPlanByIds(Long[] ids)
    {
        return tbInsuranceContractCommissionPlanMapper.deleteTbInsuranceContractCommissionPlanByIds(ids);
    }

    /**
     * 删除保险合同佣金支付计划信息
     * 
     * @param id 保险合同佣金支付计划主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceContractCommissionPlanById(Long id)
    {
        return tbInsuranceContractCommissionPlanMapper.deleteTbInsuranceContractCommissionPlanById(id);
    }
}
